import React, { Component } from "react";
import PubSub from "pubsub-js";

var mySubscriber = function (msg, data) {
  console.log(msg, data);
};

export default class YoungerBrother extends Component {
  componentDidMount() {
    PubSub.subscribe("MY TOPIC", mySubscriber);
    PubSub.subscribe("yueyueniao", (msg, data) => {
      console.log("yueyueniao ---- msg = ", msg, ", data = ", data);
    });
  }
  render() {
    return <div>YoungerBrother</div>;
  }
}
